package com.contextor.magiccards.model.character;

import com.contextor.magiccards.model.BaseEntity;
import com.contextor.magiccards.model.cards.MagicSchool;
import com.contextor.magiccards.model.user.User;

import javax.persistence.*;

/**
 * User: Sergey
 * Date: 15.03.2011 21:58:01
 */
@Entity
@Table(name = "characters")
public class Personage extends BaseEntity {

    @Column(name = "name")
    private String name;
    @Column(name = "level")
    private Integer level = 1;

    @Column
    @Enumerated(EnumType.ORDINAL)
    private MagicSchool magicSchool = MagicSchool.ORDER;

    public Personage() {
    }

    public Personage(User user, String name, MagicSchool magicSchool) {
        this.user = user;
        this.name = name;
        this.magicSchool = magicSchool;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public MagicSchool getMagicSchool() {
        return magicSchool;
    }

    public void setMagicSchool(MagicSchool magicSchool) {
        this.magicSchool = magicSchool;
    }
}
